#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    startTimer(2000);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::mousePressEvent(QMouseEvent *event)
{
    qDebug() << "鼠标被按下了";
}

void MainWindow::mouseReleaseEvent(QMouseEvent *event)
{
    qDebug() << "鼠标被松开了";
}

void MainWindow::wheelEvent(QWheelEvent *event)
{
    qDebug() << "滚轮被滚动了";
}

void MainWindow::contextMenuEvent(QContextMenuEvent *event)
{
    qDebug() << "右键菜单弹出来了";
}

void MainWindow::resizeEvent(QResizeEvent *event)
{
    qDebug() << "窗口大小被改变了";
}

void MainWindow::closeEvent(QCloseEvent *event)
{
    qDebug() << "窗口被关闭了";
}

void MainWindow::timerEvent(QTimerEvent *event)
{
    qDebug() << "时间到了";
}
